Developer Documentation

QuickTime 4 API Documentation

3D Graphics Programming with QuickDraw 3D 1.5.4

Previous | QD3D Book | Overview | Chapter Contents | Next |

Creating and Editing Ellipses

QuickDraw 3D provides routines that you can use to create and manipulate ellipses. See "Ellipses" for the definition of an ellipse.

Q3Ellipse_New

You can use the Q3Ellipse_New function to create a new ellipse.

TQ3GeometryObject Q3Ellipse_New (
                     const TQ3EllipseData *ellipseData);
ellipseData
A pointer to a TQ3EllipseData structure.

DESCRIPTION

The Q3Ellipse_New function returns, as its function result, a new ellipse having the shape and attributes specified by the ellipseData parameter. If a new ellipse could not be created, Q3Ellipse_New returns the value NULL .

Q3Ellipse_Submit

You can use the Q3Ellipse_Submit function to submit an immediate ellipse for drawing, picking, bounding, or writing.

TQ3Status Q3Ellipse_Submit (
                     const TQ3EllipseData *ellipseData,
                     TQ3ViewObject view);
ellipseData
A pointer to a TQ3EllipseData structure.
view
A view.

DESCRIPTION

The Q3Ellipse_Submit function submits for drawing, picking, bounding, or writing the immediate ellipse whose shape and attribute set are specified by the ellipseData parameter. The ellipse is drawn, picked, bounded, or written according to the view characteristics specified in the view parameter.

SPECIAL CONSIDERATIONS

You should call this function only in a submitting loop.

Q3Ellipse_GetData

You can use the Q3Ellipse_GetData function to get the data that defines an ellipse and its attributes.

TQ3Status Q3Ellipse_GetData (
                     TQ3GeometryObject ellipse,
                     TQ3EllipseData *ellipseData);
ellipse
An ellipse.
ellipseData
On exit, a pointer to a TQ3EllipseData structure that contains information about the ellipse specified by the ellipse parameter.

DESCRIPTION

The Q3Ellipse_GetData function returns, through the ellipseData parameter, information about the ellipse specified by the ellipse parameter. QuickDraw 3D allocates memory for the TQ3EllipseData structure internally; you must call Q3Ellipse_EmptyData to dispose of that memory.

Q3Ellipse_SetData

You can use the Q3Ellipse_SetData function to set the data that defines an ellipse and its attributes.

TQ3Status Q3Ellipse_SetData (
                     TQ3GeometryObject ellipse,
                     const TQ3EllipseData *ellipseData);
ellipse
An ellipse.
ellipseData
A pointer to a TQ3EllipseData structure.

DESCRIPTION

The Q3Ellipse_SetData function sets the data associated with the ellipse specified by the ellipse parameter to the data specified by the ellipseData parameter.

Q3Ellipse_EmptyData

You can use the Q3Ellipse_EmptyData function to release the memory occupied by the data structure returned by a previous call to Q3Ellipse_GetData .

TQ3Status Q3Ellipse_EmptyData (TQ3EllipseData *ellipseData);
ellipseData
A pointer to a TQ3EllipseData structure.

DESCRIPTION

The Q3Ellipse_EmptyData function releases the memory occupied by the TQ3EllipseData structure pointed to by the ellipseData parameter; that memory was allocated by a previous call to Q3Ellipse_GetData .

Q3Ellipse_GetOrigin

You can use the Q3Ellipse_GetOrigin function to get the origin of an ellipse.

TQ3Status Q3Ellipse_GetOrigin (
                     TQ3GeometryObject ellipse,
                     TQ3Point3D *origin);
ellipse
An ellipse.
origin
On exit, the origin of the specified ellipse.

DESCRIPTION

The Q3Ellipse_GetOrigin function returns, in the origin parameter, the origin of the ellipse specified by the ellipse parameter.

Q3Ellipse_SetOrigin

You can use the Q3Ellipse_SetOrigin function to set the origin of an ellipse.

TQ3Status Q3Ellipse_SetOrigin (
                     TQ3GeometryObject ellipse,
                     const TQ3Point3D *origin);
ellipse
An ellipse.
origin
The desired origin of the specified ellipse.

DESCRIPTION

The Q3Ellipse_SetOrigin function sets the origin of the ellipse specified by the ellipse parameter to that specified in the origin parameter

Q3Ellipse_GetMajorRadius

You can use the Q3Ellipse_GetMajorRadius function to get the major radius of an ellipse.

TQ3Status Q3Ellipse_GetMajorRadius (
                     TQ3GeometryObject ellipse,
                     TQ3Vector3D *majorRadius);
ellipse
An ellipse.
majorRadius
On exit, the major radius of the specified ellipse.

DESCRIPTION

The Q3Ellipse_GetMajorRadius function returns, in the majorRadius parameter, the major radius of the ellipse specified by the ellipse parameter.

Q3Ellipse_SetMajorRadius

You can use the Q3Ellipse_SetMajorRadius function to set the major radius of an ellipse.

TQ3Status Q3Ellipse_SetMajorRadius (
                     TQ3GeometryObject ellipse,
                     const TQ3Vector3D *majorRadius);
ellipse
An ellipse.
majorRadius
The desired major radius of the specified ellipse.

DESCRIPTION

The Q3Ellipse_SetMajorRadius function sets the major radius of the ellipse specified by the ellipse parameter to that specified in the majorRadius parameter.

Q3Ellipse_GetMinorRadius

You can use the Q3Ellipse_GetMinorRadius function to get the minor radius of an ellipse.

TQ3Status Q3Ellipse_GetMinorRadius (
                     TQ3GeometryObject ellipse,
                     TQ3Vector3D *minorRadius);
ellipse
An ellipse.
minorRadius
On exit, the minor radius of the specified ellipse.

DESCRIPTION

The Q3Ellipse_GetMinorRadius function returns, in the minorRadius parameter, the minor radius of the ellipse specified by the ellipse parameter.

Q3Ellipse_SetMinorRadius

You can use the Q3Ellipse_SetMinorRadius function to set the minor radius of an ellipse.

TQ3Status Q3Ellipse_SetMinorRadius (
                     TQ3GeometryObject ellipse,
                     const TQ3Vector3D *minorRadius);
ellipse
An ellipse.
minorRadius
The desired minor radius of the specified ellipse.

DESCRIPTION

The Q3Ellipse_SetMinorRadius function sets the minor radius of the ellipse specified by the ellipse parameter to that specified in the minorRadius parameter.


© 1997 Apple Computer, Inc.

Previous | QD3D Book | Overview | Chapter Contents | Next |